Skip to content

Conversation

@chrisnas
Copy link
Contributor

Summary of changes

Allow the generation of heap snapshots that are sent to the backend

Reason for change

For memory leak workflow, we would like to compare the surviving objects count to identify the leaky ones. These heap snapshots will be transformed into class histograms to look like what is generated by Java.

Implementation details

The .NET runtime allows the creation of "gcdump" thanks to dotnet-gcdump tool. Behind the scene, an induced GC is triggered when an event pipe session is created with the right keyword/verbosity. Undocumented events are then emitted by the runtime at the end of the GC - read https://chnasarre.medium.com/net-gcdump-internals-fcce5d327be7?source=friends_link&sk=3225ff119458adafc0e6935951fcc323 for more details.

Test coverage

Test added as needed

Other details

@chrisnas chrisnas requested a review from a team as a code owner October 21, 2025 08:22
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Oct 21, 2025
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just configuration, right? There's no implementation of taking the snapshot here?

@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (71ms)  : 70, 73
     .   : milestone, 71,
    master - mean (71ms)  : 70, 73
     .   : milestone, 71,

    section Baseline
    This PR (7681) - mean (68ms)  : 66, 70
     .   : milestone, 68,
    master - mean (68ms)  : 66, 69
     .   : milestone, 68,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (1,040ms)  : 999, 1081
     .   : milestone, 1040,
    master - mean (1,039ms)  : 1002, 1077
     .   : milestone, 1039,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (106ms)  : 104, 107
     .   : milestone, 106,
    master - mean (106ms)  : 104, 107
     .   : milestone, 106,

    section Baseline
    This PR (7681) - mean (105ms)  : 103, 107
     .   : milestone, 105,
    master - mean (105ms)  : 102, 107
     .   : milestone, 105,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (743ms)  : 720, 767
     .   : milestone, 743,
    master - mean (742ms)  : 724, 760
     .   : milestone, 742,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (94ms)  : 92, 95
     .   : milestone, 94,
    master - mean (93ms)  : 93, 94
     .   : milestone, 93,

    section Baseline
    This PR (7681) - mean (93ms)  : 91, 95
     .   : milestone, 93,
    master - mean (93ms)  : 91, 95
     .   : milestone, 93,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (704ms)  : 679, 729
     .   : milestone, 704,
    master - mean (704ms)  : 670, 738
     .   : milestone, 704,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (92ms)  : 91, 93
     .   : milestone, 92,
    master - mean (92ms)  : 91, 93
     .   : milestone, 92,

    section Baseline
    This PR (7681) - mean (92ms)  : 89, 94
     .   : milestone, 92,
    master - mean (91ms)  : 89, 94
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (656ms)  : 642, 671
     .   : milestone, 656,
    master - mean (659ms)  : 646, 673
     .   : milestone, 659,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (197ms)  : 192, 201
     .   : milestone, 197,
    master - mean (195ms)  : 193, 198
     .   : milestone, 195,

    section Baseline
    This PR (7681) - mean (192ms)  : 189, 196
     .   : milestone, 192,
    master - mean (193ms)  : 188, 198
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (1,168ms)  : 1104, 1233
     .   : milestone, 1168,
    master - mean (1,171ms)  : 1105, 1237
     .   : milestone, 1171,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (276ms)  : 271, 282
     .   : milestone, 276,
    master - mean (276ms)  : 272, 281
     .   : milestone, 276,

    section Baseline
    This PR (7681) - mean (276ms)  : 272, 280
     .   : milestone, 276,
    master - mean (276ms)  : 271, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (948ms)  : 908, 989
     .   : milestone, 948,
    master - mean (942ms)  : 906, 978
     .   : milestone, 942,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (269ms)  : 266, 272
     .   : milestone, 269,
    master - mean (269ms)  : 266, 272
     .   : milestone, 269,

    section Baseline
    This PR (7681) - mean (270ms)  : 265, 275
     .   : milestone, 270,
    master - mean (268ms)  : 264, 273
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (923ms)  : 881, 966
     .   : milestone, 923,
    master - mean (924ms)  : 874, 974
     .   : milestone, 924,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Bailout
    This PR (7681) - mean (269ms)  : 264, 275
     .   : milestone, 269,
    master - mean (268ms)  : 266, 271
     .   : milestone, 268,

    section Baseline
    This PR (7681) - mean (268ms)  : 264, 271
     .   : milestone, 268,
    master - mean (268ms)  : 264, 273
     .   : milestone, 268,

    section CallTarget+Inlining+NGEN
    This PR (7681) - mean (853ms)  : 831, 874
     .   : milestone, 853,
    master - mean (853ms)  : 836, 870
     .   : milestone, 853,

Loading

@pr-commenter
Copy link

pr-commenter bot commented Oct 24, 2025

Benchmarks

Benchmarks Report for benchmark platform 🐌

Benchmarks for #7681 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.530
  • 5 benchmarks have fewer allocations
  • 5 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑net472 5.99 KB 6.06 KB 71 B 1.18%

Fewer allocations 🎉 in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.ActivityBenchmark.StartStopWithChild‑netcoreapp3.1 5.74 KB 5.71 KB -32 B -0.56%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 10.2μs 57ns 369ns 0 0 0 5.5 KB
master StartStopWithChild netcoreapp3.1 13.5μs 71ns 348ns 0 0 0 5.74 KB
master StartStopWithChild net472 22.2μs 115ns 693ns 0.965 0.429 0.107 5.99 KB
#7681 StartStopWithChild net6.0 10.7μs 55.3ns 265ns 0 0 0 5.5 KB
#7681 StartStopWithChild netcoreapp3.1 13.6μs 70.3ns 337ns 0 0 0 5.71 KB
#7681 StartStopWithChild net472 22.1μs 90.4ns 350ns 1.02 0.342 0.114 6.06 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 929μs 95.7ns 358ns 0 0 0 2.71 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 313ns 1.21μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 1.21ms 547ns 2.05μs 0 0 0 3.31 KB
#7681 WriteAndFlushEnrichedTraces net6.0 970μs 958ns 3.59μs 0 0 0 2.71 KB
#7681 WriteAndFlushEnrichedTraces netcoreapp3.1 1.04ms 86.3ns 334ns 0 0 0 2.7 KB
#7681 WriteAndFlushEnrichedTraces net472 1.2ms 2.2μs 8.54μs 0 0 0 3.31 KB
Benchmarks.Trace.Asm.AppSecBodyBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
master AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
master ObjectExtractorSimpleBody net6.0 321ns 1.6ns 7.15ns 0 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 389ns 2.23ns 15.4ns 0 0 0 272 B
master ObjectExtractorSimpleBody net472 299ns 0.0415ns 0.144ns 0.0436 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 6.4μs 3.22ns 12.5ns 0 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 7.86μs 34.1ns 132ns 0 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 6.64μs 3.41ns 13.2ns 0.599 0 0 3.8 KB
#7681 AllCycleSimpleBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7681 AllCycleSimpleBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7681 AllCycleSimpleBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7681 AllCycleMoreComplexBody net6.0 N/A N/A N/A NaN NaN NaN 0 b
#7681 AllCycleMoreComplexBody netcoreapp3.1 N/A N/A N/A NaN NaN NaN 0 b
#7681 AllCycleMoreComplexBody net472 N/A N/A N/A NaN NaN NaN 0 b
#7681 ObjectExtractorSimpleBody net6.0 321ns 1.68ns 8.75ns 0 0 0 280 B
#7681 ObjectExtractorSimpleBody netcoreapp3.1 402ns 1.65ns 5.97ns 0 0 0 272 B
#7681 ObjectExtractorSimpleBody net472 297ns 0.0234ns 0.0843ns 0.0434 0 0 281 B
#7681 ObjectExtractorMoreComplexBody net6.0 6.37μs 28.6ns 111ns 0 0 0 3.78 KB
#7681 ObjectExtractorMoreComplexBody netcoreapp3.1 7.84μs 6.22ns 24.1ns 0 0 0 3.69 KB
#7681 ObjectExtractorMoreComplexBody net472 6.66μs 0.735ns 2.55ns 0.6 0 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 76μs 313ns 1.21μs 0 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 96.6μs 185ns 715ns 0 0 0 32.4 KB
master EncodeArgs net472 110μs 9.84ns 35.5ns 4.95 0 0 32.51 KB
master EncodeLegacyArgs net6.0 142μs 216ns 838ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 198μs 162ns 586ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 261μs 38.3ns 148ns 0 0 0 2.16 KB
#7681 EncodeArgs net6.0 76.8μs 164ns 613ns 0 0 0 32.4 KB
#7681 EncodeArgs netcoreapp3.1 97.2μs 265ns 1.03μs 0 0 0 32.4 KB
#7681 EncodeArgs net472 109μs 12.9ns 50.1ns 4.93 0 0 32.5 KB
#7681 EncodeLegacyArgs net6.0 143μs 69.6ns 251ns 0 0 0 2.15 KB
#7681 EncodeLegacyArgs netcoreapp3.1 201μs 514ns 1.99μs 0 0 0 2.14 KB
#7681 EncodeLegacyArgs net472 269μs 86.6ns 335ns 0 0 0 2.16 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7681

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 2.053 418,882.19 859,782.00

More allocations ⚠️ in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark‑netcoreapp3.1 4.48 KB 4.7 KB 220 B 4.91%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 393μs 76.7ns 297ns 0 0 0 4.55 KB
master RunWafRealisticBenchmark netcoreapp3.1 419μs 104ns 360ns 0 0 0 4.48 KB
master RunWafRealisticBenchmark net472 432μs 64.3ns 249ns 0 0 0 4.66 KB
master RunWafRealisticBenchmarkWithAttack net6.0 285μs 58.9ns 220ns 0 0 0 2.24 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 669μs 13.6μs 136μs 0 0 0 2.22 KB
master RunWafRealisticBenchmarkWithAttack net472 311μs 26ns 97.3ns 0 0 0 2.29 KB
#7681 RunWafRealisticBenchmark net6.0 399μs 119ns 462ns 0 0 0 4.55 KB
#7681 RunWafRealisticBenchmark netcoreapp3.1 857μs 2.22μs 8.61μs 0 0 0 4.7 KB
#7681 RunWafRealisticBenchmark net472 429μs 83.6ns 313ns 0 0 0 4.66 KB
#7681 RunWafRealisticBenchmarkWithAttack net6.0 291μs 56.5ns 212ns 0 0 0 2.24 KB
#7681 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 674μs 14.8μs 148μs 0 0 0 2.22 KB
#7681 RunWafRealisticBenchmarkWithAttack net472 311μs 23.8ns 89ns 0 0 0 2.29 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 60.7μs 44.3ns 154ns 0 0 0 14.52 KB
master SendRequest netcoreapp3.1 71.9μs 91.1ns 341ns 0 0 0 17.42 KB
master SendRequest net472 0.00734ns 0.00232ns 0.00867ns 0 0 0 0 b
#7681 SendRequest net6.0 61.1μs 39ns 146ns 0 0 0 14.52 KB
#7681 SendRequest netcoreapp3.1 74.3μs 132ns 493ns 0 0 0 17.42 KB
#7681 SendRequest net472 0.0027ns 0.00116ns 0.00449ns 0 0 0 0 b
Benchmarks.Trace.CharSliceBenchmark - Slower ⚠️ More allocations ⚠️

Slower ⚠️ in #7681

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net6.0 1.140 836,808.75 954,097.77

More allocations ⚠️ in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net6.0 2 B 7 B 5 B 250.00%

Fewer allocations 🎉 in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice‑net472 73 B 0 b -73 B -100.00%
Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool‑net472 47 B 0 b -47 B -100.00%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master OriginalCharSlice net6.0 1.93ms 222ns 831ns 0 0 0 640.01 KB
master OriginalCharSlice netcoreapp3.1 2.06ms 5.87μs 21.9μs 0 0 0 640 KB
master OriginalCharSlice net472 2.69ms 169ns 611ns 100 0 0 641.95 KB
master OptimizedCharSlice net6.0 1.42ms 238ns 892ns 0 0 0 2 B
master OptimizedCharSlice netcoreapp3.1 1.65ms 325ns 1.26μs 0 0 0 1 B
master OptimizedCharSlice net472 2ms 242ns 936ns 0 0 0 73 B
master OptimizedCharSliceWithPool net6.0 837μs 25.4ns 98.3ns 0 0 0 3 B
master OptimizedCharSliceWithPool netcoreapp3.1 837μs 58ns 225ns 0 0 0 0 b
master OptimizedCharSliceWithPool net472 1.18ms 141ns 545ns 0 0 0 47 B
#7681 OriginalCharSlice net6.0 1.91ms 281ns 1.05μs 0 0 0 640.01 KB
#7681 OriginalCharSlice netcoreapp3.1 2.11ms 7.16μs 33.6μs 0 0 0 640 KB
#7681 OriginalCharSlice net472 2.62ms 90.3ns 338ns 100 0 0 641.95 KB
#7681 OptimizedCharSlice net6.0 1.34ms 212ns 791ns 0 0 0 7 B
#7681 OptimizedCharSlice netcoreapp3.1 1.72ms 429ns 1.66μs 0 0 0 1 B
#7681 OptimizedCharSlice net472 1.91ms 162ns 607ns 0 0 0 0 b
#7681 OptimizedCharSliceWithPool net6.0 954μs 30ns 108ns 0 0 0 3 B
#7681 OptimizedCharSliceWithPool netcoreapp3.1 823μs 211ns 819ns 0 0 0 0 b
#7681 OptimizedCharSliceWithPool net472 1.13ms 80.6ns 312ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net472 55.75 KB 56.15 KB 403 B 0.72%

Fewer allocations 🎉 in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 43.03 KB 41.93 KB -1.1 KB -2.56%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 671μs 2.56μs 9.91μs 0 0 0 41.79 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 827μs 3.22μs 12.5μs 0 0 0 43.03 KB
master WriteAndFlushEnrichedTraces net472 918μs 4.43μs 17.7μs 4.46 0 0 55.75 KB
#7681 WriteAndFlushEnrichedTraces net6.0 686μs 1.98μs 7.68μs 0 0 0 41.76 KB
#7681 WriteAndFlushEnrichedTraces netcoreapp3.1 751μs 878ns 3.4μs 0 0 0 41.93 KB
#7681 WriteAndFlushEnrichedTraces net472 897μs 2.65μs 10.3μs 8.33 0 0 56.15 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.9μs 2.59ns 8.96ns 0 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 2.63μs 2.77ns 10.7ns 0 0 0 1.02 KB
master ExecuteNonQuery net472 2.91μs 3.82ns 14.8ns 0.147 0.0147 0 987 B
#7681 ExecuteNonQuery net6.0 1.95μs 6.98ns 26.1ns 0 0 0 1.02 KB
#7681 ExecuteNonQuery netcoreapp3.1 2.62μs 9.19ns 35.6ns 0 0 0 1.02 KB
#7681 ExecuteNonQuery net472 2.88μs 4.22ns 15.8ns 0.156 0.0142 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.72μs 0.672ns 2.6ns 0 0 0 1.03 KB
master CallElasticsearch netcoreapp3.1 2.15μs 10.7ns 45.2ns 0 0 0 1.03 KB
master CallElasticsearch net472 3.66μs 2.86ns 11.1ns 0.163 0 0 1.04 KB
master CallElasticsearchAsync net6.0 1.85μs 10ns 52.1ns 0 0 0 1.01 KB
master CallElasticsearchAsync netcoreapp3.1 2.34μs 11.6ns 49.1ns 0 0 0 1.08 KB
master CallElasticsearchAsync net472 3.62μs 1.63ns 6.32ns 0.163 0 0 1.1 KB
#7681 CallElasticsearch net6.0 1.72μs 4.97ns 17.9ns 0 0 0 1.03 KB
#7681 CallElasticsearch netcoreapp3.1 2.3μs 10.5ns 42.1ns 0 0 0 1.03 KB
#7681 CallElasticsearch net472 3.57μs 2.1ns 7.84ns 0.161 0 0 1.04 KB
#7681 CallElasticsearchAsync net6.0 1.84μs 7.22ns 28ns 0 0 0 1.01 KB
#7681 CallElasticsearchAsync netcoreapp3.1 2.42μs 6.61ns 25.6ns 0 0 0 1.08 KB
#7681 CallElasticsearchAsync net472 3.69μs 2.15ns 8.31ns 0.166 0 0 1.1 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.87μs 9.28ns 39.4ns 0 0 0 952 B
master ExecuteAsync netcoreapp3.1 2.5μs 8.47ns 31.7ns 0 0 0 952 B
master ExecuteAsync net472 2.64μs 3.26ns 12.6ns 0.144 0 0 915 B
#7681 ExecuteAsync net6.0 1.96μs 7.97ns 28.7ns 0 0 0 952 B
#7681 ExecuteAsync netcoreapp3.1 2.46μs 2.93ns 11.3ns 0 0 0 952 B
#7681 ExecuteAsync net472 2.64μs 5.69ns 22ns 0.144 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 6.85μs 4.95ns 19.2ns 0 0 0 2.36 KB
master SendAsync netcoreapp3.1 8.68μs 2.06ns 7.13ns 0 0 0 2.9 KB
master SendAsync net472 12.2μs 12.7ns 49.3ns 0.484 0 0 3.18 KB
#7681 SendAsync net6.0 6.82μs 10.5ns 37.9ns 0 0 0 2.36 KB
#7681 SendAsync netcoreapp3.1 8.59μs 21.5ns 83.3ns 0 0 0 2.9 KB
#7681 SendAsync net472 12.1μs 6.81ns 26.4ns 0.484 0 0 3.18 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net472 278.53 KB 286.72 KB 8.19 KB 2.94%

Fewer allocations 🎉 in #7681

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 271.96 KB 255.82 KB -16.14 KB -5.93%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 49.1μs 264ns 2.06μs 0 0 0 44.25 KB
master StringConcatBenchmark netcoreapp3.1 47.9μs 267ns 1.87μs 0 0 0 42.74 KB
master StringConcatBenchmark net472 56.5μs 255ns 919ns 0 0 0 57.34 KB
master StringConcatAspectBenchmark net6.0 475μs 1.69μs 6.08μs 0 0 0 278.98 KB
master StringConcatAspectBenchmark netcoreapp3.1 508μs 2.19μs 9.79μs 0 0 0 271.96 KB
master StringConcatAspectBenchmark net472 403μs 1.9μs 13.7μs 0 0 0 278.53 KB
#7681 StringConcatBenchmark net6.0 46.6μs 274ns 2.53μs 0 0 0 44.06 KB
#7681 StringConcatBenchmark netcoreapp3.1 48.7μs 256ns 1.2μs 0 0 0 42.64 KB
#7681 StringConcatBenchmark net472 57.2μs 109ns 379ns 0 0 0 57.34 KB
#7681 StringConcatAspectBenchmark net6.0 487μs 1.98μs 7.15μs 0 0 0 279.47 KB
#7681 StringConcatAspectBenchmark netcoreapp3.1 504μs 1.06μs 3.66μs 0 0 0 255.82 KB
#7681 StringConcatAspectBenchmark net472 406μs 1.99μs 8.7μs 0 0 0 286.72 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.67μs 5.91ns 22.1ns 0 0 0 1.7 KB
master EnrichedLog netcoreapp3.1 3.61μs 18ns 80.6ns 0 0 0 1.7 KB
master EnrichedLog net472 4.01μs 5.21ns 19.5ns 0.24 0 0 1.64 KB
#7681 EnrichedLog net6.0 2.62μs 0.456ns 1.77ns 0 0 0 1.7 KB
#7681 EnrichedLog netcoreapp3.1 3.57μs 16.2ns 64.8ns 0 0 0 1.7 KB
#7681 EnrichedLog net472 4.04μs 4.01ns 15.5ns 0.243 0 0 1.64 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 123μs 82.3ns 308ns 0 0 0 4.31 KB
master EnrichedLog netcoreapp3.1 127μs 249ns 864ns 0 0 0 4.31 KB
master EnrichedLog net472 165μs 37.5ns 135ns 0 0 0 4.51 KB
#7681 EnrichedLog net6.0 127μs 355ns 1.33μs 0 0 0 4.31 KB
#7681 EnrichedLog netcoreapp3.1 129μs 107ns 414ns 0 0 0 4.31 KB
#7681 EnrichedLog net472 167μs 28.8ns 112ns 0 0 0 4.52 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.9μs 18.4ns 71.1ns 0 0 0 2.26 KB
master EnrichedLog netcoreapp3.1 6.73μs 22.3ns 83.6ns 0 0 0 2.26 KB
master EnrichedLog net472 7.62μs 6.22ns 24.1ns 0.305 0 0 2.08 KB
#7681 EnrichedLog net6.0 5.07μs 3.99ns 14.9ns 0 0 0 2.26 KB
#7681 EnrichedLog netcoreapp3.1 6.98μs 23.8ns 92.1ns 0 0 0 2.26 KB
#7681 EnrichedLog net472 7.56μs 6.01ns 22.5ns 0.302 0 0 2.08 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.96μs 10.2ns 50.1ns 0 0 0 1.2 KB
master SendReceive netcoreapp3.1 2.66μs 9.2ns 35.6ns 0 0 0 1.2 KB
master SendReceive net472 3.13μs 9.52ns 36.9ns 0.188 0 0 1.2 KB
#7681 SendReceive net6.0 1.97μs 9.79ns 44.9ns 0 0 0 1.2 KB
#7681 SendReceive netcoreapp3.1 2.58μs 6.76ns 26.2ns 0 0 0 1.2 KB
#7681 SendReceive net472 3.16μs 3.88ns 15ns 0.191 0 0 1.2 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 4.28μs 7.04ns 27.3ns 0 0 0 1.58 KB
master EnrichedLog netcoreapp3.1 5.57μs 17.9ns 69.2ns 0 0 0 1.63 KB
master EnrichedLog net472 6.53μs 12.4ns 48ns 0.291 0 0 2.03 KB
#7681 EnrichedLog net6.0 4.33μs 17.3ns 67ns 0 0 0 1.58 KB
#7681 EnrichedLog netcoreapp3.1 5.57μs 6.78ns 26.3ns 0 0 0 1.63 KB
#7681 EnrichedLog net472 6.85μs 6.13ns 23.7ns 0.309 0 0 2.03 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 793ns 1.61ns 6.24ns 0 0 0 576 B
master StartFinishSpan netcoreapp3.1 949ns 4.89ns 21.9ns 0 0 0 576 B
master StartFinishSpan net472 920ns 0.473ns 1.83ns 0.0877 0 0 578 B
master StartFinishScope net6.0 924ns 4.7ns 21.6ns 0 0 0 696 B
master StartFinishScope netcoreapp3.1 1.21μs 2.24ns 8.38ns 0 0 0 696 B
master StartFinishScope net472 1.12μs 0.599ns 2.32ns 0.103 0 0 658 B
#7681 StartFinishSpan net6.0 779ns 3.67ns 14.2ns 0 0 0 576 B
#7681 StartFinishSpan netcoreapp3.1 942ns 5ns 26.5ns 0 0 0 576 B
#7681 StartFinishSpan net472 924ns 1.34ns 5.18ns 0.0877 0 0 578 B
#7681 StartFinishScope net6.0 895ns 4.42ns 19.3ns 0 0 0 696 B
#7681 StartFinishScope netcoreapp3.1 1.2μs 5.6ns 22.4ns 0 0 0 696 B
#7681 StartFinishScope net472 1.11μs 0.758ns 2.94ns 0.101 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 1.05μs 5.08ns 20.3ns 0 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 1.45μs 6.94ns 30.2ns 0 0 0 696 B
master RunOnMethodBegin net472 1.46μs 1.13ns 4.38ns 0.102 0 0 658 B
#7681 RunOnMethodBegin net6.0 1.06μs 5.26ns 21.7ns 0 0 0 696 B
#7681 RunOnMethodBegin netcoreapp3.1 1.47μs 0.817ns 3.16ns 0 0 0 696 B
#7681 RunOnMethodBegin net472 1.44μs 0.611ns 2.2ns 0.101 0 0 658 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:profiler Issues related to the continous-profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants